clc
clear all
close all

fn = ['24.03.09 - Teste FFT\imagemSint.jpg'];
imo = imread(fn);
image = imo(1:700 ,1:700);
PQ = paddedsize(size(image));
 
S = fftshift(fft2(image));
S = abs(S);
S = mat2gray(log(1+S));
figure(6), imshow(S);
figure(7), imshow(image);

sig = 5;
H1 = lpfilter('gaussian',PQ(1),PQ(2), 2*sig);

g = dftfilt(image,H1);

sig = 3;
H2 = hpfilter('gaussian',PQ(1),PQ(2), 2*sig);

H2 = 0.7 + 2*H2;

g1 = dftfilt(g,H2);
figure(4), imshow(g,[])
figure(5), imshow(g1,[])

figure, surf(g1(1:10:size(g1,1)), 1:10:size(g1,2));
